const minimist = require('minimist')
const execa = require('execa')
const args = minimist(process.argv.slice(2))
const target =args._.length?args._[0]:"canvas-tree"
const formats = args.f ||"global"
const sourcemap = args.s||false
execa("rollup",["-wc","--environment",[`TARGET:${target}`,`FORMATS:${formats}`,sourcemap?`SOURCE_MAP:true`:``].filter(Boolean).join(',')],{stdio: 'inherit'})